#include "widget.h"
#include "ui_widget.h"
#include <QString>
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
    QString result;
    if(ui->checkBox_eat->isChecked()) {
        result += ui->checkBox_eat->text();
    }
    if(ui->checkBox_sleep->isChecked()) {
        result += ui->checkBox_sleep->text();
    }
    if(ui->checkBox_play->isChecked()) {
        result += ui->checkBox_play->text();
    }
    qDebug() << "选中的内容: " << result;
}
